<template>
<el-dialog class="analysis-report" :append-to-body="true" :visible.sync="detail.show" width="1036px" :close-on-click-modal="false">
    <template slot="title">
        <span class="el-dialog__title">{{list[detail.moduleId].title}}</span>
        <!-- <span class="info">
            <i class="iconfont icon-chuangjianren"></i>
            <span>{{'admin'}}</span>
        </span>
        <span class="info">
            <i class="iconfont icon-shijian1"></i>
            <span>{{'2015-12-15 05:23:24'}}</span>
        </span> -->
    </template>
    <component :is="list[detail.moduleId].componentId"></component>
    <span slot="footer" class="dialog-footer"></span>
</el-dialog>
</template>

<script>
import UnivariateAnalysis from './univariateAnalysis'
import BivariateAnalysis from './bivariateAnalysis'
import CorrelationAnalysis from './correlationAnalysis'
import FeatureEngineer from './featureEngineer'
export default {
    name: 'AnalysisReport',
    props: {
        detail: {
            required: true,
            type: Object
        }
    },
    data () {
        return {
            list: {
                29: { title: '单变量分析报告', componentId: UnivariateAnalysis },
                30: { title: '双变量分析报告', componentId: BivariateAnalysis },
                31: { title: '关联分析报告', componentId: CorrelationAnalysis },
                37: { title: '特征离散分析报告', componentId: FeatureEngineer }
            }
        }
    }
}
</script>

<style lang="less">
.analysis-report {
    .el-dialog__header {
        display: flex;
    }
    .info {
        display: flex;
        align-items: center;
        font-size: 12px;

        i {
            padding-left: 20px;
            padding-right: 5px;
        }
    }
}
</style>
